/****** Object:  Stored Procedure dbo.spr_InsertDBEmployees  ******/

 use [TourIS]
 GO

 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spr_InsertDBEmployees]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[spr_InsertDBEmployees]
 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS OFF
 GO

 CREATE  PROCEDURE [dbo].[spr_InsertDBEmployees]
 (
	@companyid int,
	@department varchar(50),
	@designation varchar(50),
	@empid int,
	@expirydate smalldatetime,
	@fullname varchar(50),
	@isactive bit,
	@login varchar(50),
	@password varchar(50)
 )
 AS

 BEGIN
	SET NOCOUNT ON
	DECLARE @Err int

	INSERT INTO [Employees]
	(
		[CompanyId],
		[Department],
		[Designation],
		[EmpID],
		[ExpiryDate],
		[FullName],
		[IsActive],
		[LogIn],
		[Password]
	)
	VALUES
	(
		@companyid,
		@department,
		@designation,
		@empid,
		@expirydate,
		@fullname,
		@isactive,
		@login,
		@password
	)

	SET @Err = @@Error
	RETURN @Err
 END

 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO

